In [1]:
import pandas as pd
import numpy as np
import glob
import sys
sys.path.append('../../../plume_dynamic_analyzer/src/')
from analyze_function import load_plumes_and_align, run_plume_analysis

#YG066
file_path = 'D:/pld_plumes/SRO_STO_Drexel/YG066_YichenGuo_09112024.h5'
frame_view_index = 2
plumes, ds_name, frame_view, fig = load_plumes_and_align(file_path, frame_view_index=frame_view_index)
fig.show()

coords_path = '../../../data/Plumes/frame_normalization_coords/YG066_coords.npy'
standard_coords_path = '../../../data/Plumes/frame_normalization_coords/standard_coords.npy'
output_csv_path = '../../../data/Plumes/SRO_plume_metrics/YG066_metrics.csv'

coords = np.array([[34,51], [36,215], [382,47], [382,229]])
viz_parms = {'viz':True, 'index':frame_view_index, 'viz_index':list(np.arange(0, 32, 1)), 'plume_name': ds_name, 'progress_bar':False}
metric_parms = {'time_interval':500e-9, 'threshold_list':[200, 5, 'flexible'], 'rename_dataset':True}

run_plume_analysis(plumes, ds_name, frame_view, coords, coords_path, standard_coords_path, output_csv_path, 
                   viz_parms=viz_parms, metric_parms=metric_parms, align=True) 


# special long pre-ablation plume
plumes, ds_name, frame_view, fig = load_plumes_and_align(file_path, frame_view_index=frame_view_index,
                                                plume_name='1-SrRuO3_Pre', pre_plume_name='1-SrRuO3_Pre')
fig.show()

coords_path = '../../../data/Plumes/frame_normalization_coords/YG066_coords.npy'
standard_coords_path = '../../../data/Plumes/frame_normalization_coords/standard_coords.npy'
output_csv_path = '../../../data/Plumes/SRO_plume_metrics/YG066_pre_metrics.csv'

coords = np.array([[34,51], [36,215], [382,47], [382,229]])
viz_parms = {'viz':True, 'index':frame_view_index, 'viz_index':list(np.arange(0, 32, 1)), 'plume_name': ds_name, 'progress_bar':False}
metric_parms = {'time_interval':500e-9, 'threshold_list':[200, 5, 'flexible'], 'rename_dataset':True}

run_plume_analysis(plumes[1:], ds_name+'_pre', frame_view, coords, coords_path, standard_coords_path, output_csv_path, 
                   viz_parms=viz_parms, metric_parms=metric_parms, align=True)        
Available datasets: ['1-SrRuO3', '1-SrRuO3_Pre']
No description has been provided for this image
No description has been provided for this image
Running analysis for threshold: 200
No description has been provided for this image
No description has been provided for this image
Running analysis for threshold: 5
No description has been provided for this image
No description has been provided for this image
Running analysis for threshold: flexible
No description has been provided for this image
No description has been provided for this image
Results saved to ../../../data/Plumes/SRO_plume_metrics/YG066_metrics.csv
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
Available datasets: ['1-SrRuO3', '1-SrRuO3_Pre']
No description has been provided for this image
No description has been provided for this image
Running analysis for threshold: 200
No description has been provided for this image
No description has been provided for this image
Running analysis for threshold: 5
No description has been provided for this image
No description has been provided for this image
Running analysis for threshold: flexible
No description has been provided for this image
No description has been provided for this image
Results saved to ../../../data/Plumes/SRO_plume_metrics/YG066_pre_metrics.csv
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image